function EditBox(blockID,serverDownText) {
    Block.call(this,blockID,serverDownText);
    
    this.defaultValue = null;
    this.replaced = true;
    this.changeClassOnFocusTo = null;
    this.changeClassOnValueTo = null;
    var startClasses = null;
    
    this.onFocusIn = function() {
        if (startClasses == null) {
            startClasses = this.dom().className;
            this.dom().innerHTML = '';
        }
        if(this.replaced) {
            this.dom().value = '';
        }
        this.replaced = false;
        if(this.changeClassOnFocusTo != null) {
            $addClass(this.dom(), this.changeClassOnFocusTo);
        }
    }
    
    this.onFocusOut = function() {
        if(this.defaultValue != null && !this.dom().value) {
            this.replaced = true;
            this.dom().value = this.defaultValue;
        }
        if(this.replaced) {
            this.dom().className = startClasses;
        }
        else if(this.changeClassOnValueTo != null) {
            $addClass(this.dom(), this.changeClassOnValueTo);
        }
    }
}

